package com.stone.collection;

import com.stone.rpc.service.UserService;
import com.stone.service.UserRpcService;
import org.apache.dubbo.config.annotation.DubboReference;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
public class UserCollection {


    @Autowired
    private UserRpcService userService;


    @GetMapping("/getUser")
    public String getUser(@RequestParam Integer id){

        return userService.getUser(id).toString();
    }
}
